package Lesson20;

public class Person 
{
	private String name;
	
	void setName(String name)
	{
		this.name = name;
	}
	boolean hasSameName(Person other) throws PersonException
	{
		try
		{
			//Something from Eclipse
			//imashe conflict
			boolean b = this.name.equals(other.name);
			System.out.println("Some text between all");
			return b;
		}
		catch(NullPointerException e)
		{
//			System.out.println(e.getStackTrace());
//			for(StackTraceElement ste : e.getStackTrace())
//				System.out.println(ste.getMethodName() + ste.getLineNumber());
//			System.out.println("Name of your initial person is Null!");
//			return false;
			throw new PersonException("Person failed", e);
		}
//		catch(Exception e)
//		{
//			System.out.println("Wrong use of arrays!");
//			return false;
//		}

    //Server modification
	}
}
